from variable import *

srcfile = ["/ATP1术前报告模板.xlsx",\
             "/ATP2术后报告模板.xlsx",\
             "/FRM0943.xltm",\
             "/590.xlsm"]
DesktopPath = "C:/Users/linux/Desktop"


def deletefile():
    # 删除多余文件
    if (os.path.exists(MailWork_path + "/" + "获取文件名列表.txt") and os.path.exists(MailWork_path + "/" + "test.json")):
        os.remove(MailWork_path + "/" + "获取文件名列表.txt")
        os.remove(MailWork_path + "/" + "test.json")
        print('移除后test 目录下有文件：%s' % os.listdir(MailWork_path))
    else:
        print("要删除的文件不存在！")

    for i in srcfile:
        shutil.copyfile(DesktopPath+i,Report_BasicPath+i)
        print("从    {0}    复制到 {1} ".format(DesktopPath+i,Report_BasicPath+i))


